import {
	https
} from '../https.js'
export default {
	async logout() {
		const res = await https({
			url: 'api/user/logout',
			method: 'post',
		})
		return res
	},
	// 登录
	async phoneLogin(data) {
		const res = await https({
			url: '/gzsd/sys/phoneLogin',
			method: 'post',
			data
		})
		return res
	},
	// 注册
	async register(data) {
		const res = await https({
			url: '/gzsd/sys/user/register',
			method: 'post',
			data
		})
		return res
	},
	// 获取验证码
	async getSendCode(data) {
		const res = await https({
			url: '/gzsd/sys/getSendCode',
			method: 'post',
			data
		})
		return res
	},
	// 获取用户信息
	async getUserInfo(data) {
		const res = await https({
			url: '/gzsd/sys/user/getUserInfo',
			method: 'get',
			data
		})
		return res
	},
	// 修改用户信息
	async userEdit(data) {
		const res = await https({
			url: '/gzsd/sys/user/edit',
			method: 'post',
			data
		})
		return res
	},
	// 获取收货信息
	async getAddress(data) {
		const res = await https({
			url: '/gzsd/address/queryById',
			method: 'get',
			data
		})
		return res
	},
	// 修改收货信息
	async editAddress(data) {
		const res = await https({
			url: '/gzsd/address/updateAddress',
			method: 'post',
			data
		})
		return res
	},
	// 省市区
	async organTree(data) {
		const res = await https({
			url: '/gzsd/organ/tree',
			method: 'get',
			data
		})
		return res
	},
	// 数据字典
	async dictItemCheck(data) {
		const res = await https({
			url: '/gzsd/sys/dictItem/list',
			method: 'get',
			data
		})
		return res
	},
	// 我的代理商
	async myAgentList(data) {
		const res = await https({
			url: '/gzsd/sys/user/myAgent',
			method: 'get',
			data
		})
		return res
	},
	// 忘记密码
	async forgotPassword(data) {
		const res = await https({
			url: '/gzsd/sys/user/forgotPassword',
			method: 'post',
			data
		})
		return res
	},
	// 获取字典数据
	async dictItemGetlist(data) {
		const res = await https({
			url: '/gzsd/sys/dictItem/getList ',
			method: 'post',
			data
		})
		return res
	},
	// 验证验证码是否正确
	async verifyVerificationCode(data) {
		const res = await https({
			url: '/gzsd/gzAgentIncome/verifyVerificationCode',
			method: 'post',
			data
		})
		return res
	},
	// 电量申报获取短信验证
	async agentIncomeCodeNew(data) {
		const res = await https({
			url: '/gzsd/gzAgentIncome/agentIncomeCodeNew',
			method: 'post',
			data
		})
		return res
	},
	// 获取结算验证码
	async settlementInquiry(data) {
		const res = await https({
			url: '/gzsd/gzAgentIncome/settlementInquiry',
			method: 'post',
			data
		})
		return res
	},
	// 获取视频号显示配置
	async queryGzVideoConfig(data) {
		const res = await https({
			url: '/gzsd/gzVideoConfig/queryGzVideoConfig',
			method: 'get',
			data
		})
		return res
	},
	// 获取验证码
	async getDxCode(data) {
		const res = await https({
			url: '/gzsd/sys/creatCode',
			method: 'post',
			data
		})
		return res.data
	}
}
